//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatopenMiniappDomains, WechatopenMiniappDomainsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatopenMiniappDomainsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatopenMiniappDomainsResponse>(`/uctoo/wechatopen_miniapp_domains/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatopenMiniappDomains = async (id: string) => {
  return requestClient.get<WechatopenMiniappDomains>(`/uctoo/wechatopen_miniapp_domains/${id}`);
};

export const adductooWechatopenMiniappDomains = async (data: Partial<WechatopenMiniappDomains>) => {
  return requestClient.post<WechatopenMiniappDomains>('/uctoo/wechatopen_miniapp_domains/add', data);
};

export const edituctooWechatopenMiniappDomains = async (data: Partial<WechatopenMiniappDomains>) => {
  return requestClient.post<WechatopenMiniappDomains>('/uctoo/wechatopen_miniapp_domains/edit', data);
};

export const deleteuctooWechatopenMiniappDomains = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechatopen_miniapp_domains/del', { id });
};
